// NotificationService.java
import com.google.inject.Inject;

public class NotificationService {
    private final EmailService emailService;

    // 使用构造函数注入 EmailService
    @Inject
    public NotificationService(EmailService emailService) {
        this.emailService = emailService;
    }

    public void notify(String message) {
        emailService.sendEmail(message);
    }
}